let arr = ['../image/tou01.jpg', '../image/tou02.jpg', '../image/tou03.jpg', '../image/tou04.jpg'];
let send = document.querySelector('.send');
let form = document.querySelector('.form');
let issue = document.querySelector('.issue');
send.onclick = function () {
    form.style.display = 'block';
}

function getMessage() {

    issue.onclick = function () {
        let show = document.createElement('div');
        show.setAttribute('class', 'list2');
        let img = document.createElement('img');
        let index = Math.floor(Math.random() * arr.length);
        img.setAttribute('src', arr[index]);
        show.appendChild(img);
        let title = document.createElement('span')
        let writing = document.querySelector('.title').value;
        let node = document.createTextNode('标题：' + writing);
        title.appendChild(node);
        show.appendChild(title);
        //console.log(title);
        let plate = document.createElement('span');
        let writing1 = (document.querySelector('#se')).value;
        let node1 = document.createTextNode('板块：' + writing1);
        plate.appendChild(node1);
        show.appendChild(plate);
        //console.log(writing1);
        //console.log(plate);
        let day = document.createElement('span');
        let time = new Date();
        day.innerHTML = time
        show.appendChild(day);
        console.log(show);
        app.appendChild(show)
        form.style.display = 'none';
    }
}

getMessage()

